﻿Imports DataAccess
Public Class FacturaVentaBL
    Public Shared Function Save(zFacturaVenta As facturasventa) As facturasventa
        Dim factura = SearchById(zFacturaVenta.FACTURAID)
        If IsNothing(factura) Then
            Return FacturaVentaDAL.Create(zFacturaVenta)
        Else
            Return FacturaVentaDAL.Update(zFacturaVenta)
        End If

    End Function
    Public Shared Function SearchById(zId As Long) As facturasventa
        Return FacturaVentaDAL.SearchById(zId)
    End Function
    Public Shared Function delete(zFactura As facturasventa) As Boolean
        Return FacturaVentaDAL.delete(zFactura)
    End Function
End Class
